<?php

/**
 * 首页
 * User: xsh
 * Date: 2017/9/14
 * Time: 20:11
 */

namespace app\home\Controller;
use think\Controller;

class Index extends Base
{
    /*
    *	构造函数
    */
    function __construct(){
        parent::__construct();
    }

    //首页
    public function index(){

        $link = db('link')->where('status', 1)->field('pic, title, content')->order('displayorder')->select();
        $banner = db('banner')->where('status', 1)->field('pic')->order('displayorder')->select();

        $this->assign('link', $link);
        $this->assign('banner', $banner);
        return $this->fetch();
    }

}